package Chapter8;
import java.io.File;
import java.io.IOException;
public class Example25 {
	public static void main(String[] args) {
		File file=new File("example.txt");
		System.out.println("File's name"+file.getName());
		System.out.println("File's path"+file.getPath());
		System.out.println("File's absolutepath"+file.getAbsolutePath());
		System.out.println("File's parent"+file.getParent());
		System.out.println(file.canRead()?"can read":"can't read");
		System.out.println(file.canWrite()?"can write":"can't write");
		System.out.println(file.isFile()?"It's a file":"It's not a file");
		System.out.println(file.isDirectory()?"It's a directory":"not a directory");
		System.out.println(file.isAbsolute()?"absolutepath":"not absolutepath");
		System.out.println("last modified"+file.lastModified());
		System.out.println("size "+file.length()+" byte");
		System.out.println("delete successfully or not"+file.delete());

		

	}

}
